package com.peas.platform.module.icims.base.dict.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 数据字典类型
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_dict_type`")
public class DictTypePo extends BasePo {

    // 数据字典类型编码
    @Comment(value = "数据字典类型编码")
    @NotBlank(message = "数据字典类型编码不能为空")
    @Size(max = 50, message = "数据字典类型编码不能超过50个字符")
    @TableField(value = "`dict_type`", jdbcType = JdbcType.VARCHAR)
    private String dictType;

    // 数据字典类型名称
    @Comment(value = "数据字典类型名称")
    @NotBlank(message = "数据字典类型名称不能为空")
    @Size(max = 200, message = "数据字典类型名称不能超过200个字符")
    @TableField(value = "`dict_name`", jdbcType = JdbcType.VARCHAR)
    private String dictName;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 排序权重
    @Comment(value = "排序权重")
    @TableField(value = "`weight`", jdbcType = JdbcType.INTEGER)
    private Integer weight;

    // 适用模块
    // 枚举取值:Module
    @Comment(value = "适用模块", enumType = "Module")
    @Size(max = 20, message = "适用模块不能超过20个字符")
    @TableField(value = "`module`", jdbcType = JdbcType.VARCHAR)
    private String module;

}
